#Specify the version being used as well as the language
cmake_minimum_required(VERSION 2.8.7)

#Name your project here
project(zoo_tycoon)

set(CMAKE_BUILD_TYPE Debug)

add_definitions( -Wall -lnsl )

aux_source_directory(./ipcRemoto ipcrem)
aux_source_directory(./comun comun)
aux_source_directory(./interfaces interf)
aux_source_directory(./ipc ipc)
aux_source_directory(./Anillo anillo)

set(includes ${comun} ${ipc} ${interf} ${anillo} ${ipcrem} ServidorRPC/servidor_rpc_xdr.c)

add_executable(init InitAndEnder/init.cpp ${includes})
add_executable(ender InitAndEnder/ender.cpp ${includes})

add_executable(persona Persona/persona.cpp ${includes})

add_executable(bus Bus/bus.cpp ${includes})

add_executable(entrada Puertas/puertaEntrada.cpp ${includes})
add_executable(salida Puertas/puertaSalida.cpp ${includes})

add_executable(entradaSala Sala/entradaSala.cpp ${includes}) 

add_executable(salidaSala Sala/salidaSala.cpp ${includes})


add_executable(admin Administrador/administrador.cpp ${includes})

add_executable(lanzador Lanzador/lanzador.cpp ${includes})
add_executable(lanzadorSalas Lanzador/lanzadorSalas.cpp ${includes})
add_executable(lanzadorPuertas Lanzador/lanzadorPuertas.cpp ${includes})
add_executable(lanzadorBuses Lanzador/lanzadorBuses.cpp ${includes})

add_executable(lanzadorPersonas LanzadorPersonas/lanzadorPersonas.cpp ${includes})


add_executable(broker Broker/brokerMain.cpp ${includes})
add_executable(brokerConector Broker/brokerConector.cpp ${includes})
add_executable(brokerComunicator Broker/brokerComunicator.cpp ${includes})
add_executable(timeOut Broker/timeOut.cpp ${includes})
add_executable(timeOutToken Broker/timeOutToken.cpp ${includes})

add_executable(reader Broker/test/reader.cpp ${includes})
add_executable(writer Broker/test/writer.cpp ${includes})

add_executable(initBroker InitAndEnder/initBroker.cpp ${includes})
add_executable(enderBroker InitAndEnder/enderBroker.cpp ${includes})

add_executable(conexBrokerCliente Broker/conexionBrokerCliente.cpp ${includes})

add_executable(servrpc ServidorRPC/servidor_rpc_svc.c ServidorRPC/servidor_rpc_server.c ServidorRPC/mapa.c ServidorRPC/servidor_interno.c ServidorRPC/servidor_rpc_xdr.c)

add_executable(testrpc Tests/testServidorRemoto.cpp ${includes})

add_executable(testipc Tests/testIpc.cpp ${includes})
add_executable(testent Tests/testEntidades.cpp ${includes})

add_executable(rpc Broker/rpcConsulta.cpp ${includes})

